import json

if __name__ == '__main__':
    # 1、读取文件
    with open("../../data/students.json", mode="r", encoding="UTF-8") as file:
        # 每一行是一个json字符串
        student_json = [line.rstrip() for line in file.readlines()]

    # 取出班级
    for student in student_json:
        # 将json字符串转换成字典
        student_dict = json.loads(student)
        # 取出班级
        clazz = student_dict["clazz"]
        print(clazz)
